using System.Collections.Generic;
using DataEntities.Base;
using System;

namespace DataEntities
{
    public class People : BusinesObjectBase
    {
        private Dogovor _dogovor;
        private string _name;
        private string _surName;
        private string _name1;
        private int _appartment;
        private string _phoneHome;
        private string _phoneMobile;
        private bool _isDogovorPresent;
        private bool _isPayLastReceipt;
        private int _debt;
        private DateTime _dateLastPay;
        private bool _isHaveBonus;
        private IList<Receipt> _historyCreatedReceiptsList;
        private IList<Receipt> _historyPayedReceiptsList;
        private long _lsCode;

        public virtual Dogovor Dogovor { get { return _dogovor; } set { _dogovor = value; } }
        public virtual string Name { get { return _name; } set { _name = value; } }
        public virtual string SurName { get { return _surName; } set { _surName = value; } }
        public virtual string Name1 { get { return _name1; } set { _name1 = value; } }
        public virtual int Appartment { get { return _appartment; } set { _appartment = value; } }
        public virtual string PhoneHome { get { return _phoneHome; } set { _phoneHome = value; } }
        public virtual string PhoneMobile { get { return _phoneMobile; } set { _phoneMobile = value; } }
        public virtual bool IsDogovorPresent { get { return _isDogovorPresent; } set { _isDogovorPresent = value; } }
        public virtual bool IsPayLastReceipt { get { return _isPayLastReceipt; } set { _isPayLastReceipt = value; } }
        public virtual int Debt { get { return _debt; } set { _debt = value; } }
        public virtual DateTime DateLastPay { get { return _dateLastPay; } set { _dateLastPay = new DateTime(value.Year, value.Month, value.Day); } }
        public virtual bool IsHaveBonus { get { return _isHaveBonus; } set { _isHaveBonus = value; } }
        public virtual long LsCode { get { return _lsCode; } set { _lsCode = value; } }

        public virtual IList<Receipt> HistoryCreatedReceiptsList { get { return _historyCreatedReceiptsList; } set { _historyCreatedReceiptsList = value; } }
        public virtual IList<Receipt> HistoryPayedReceiptsList { get { return _historyPayedReceiptsList; } set { _historyPayedReceiptsList = value; } }

        protected People()
            : this(0,null,"","","",0,"","",false,false,0)
        {
        }

        public People(int id): this(id,null,"","","",0,"","",false,false,0)
        {
        }

        public People(Dogovor dogovor, string name, string surName, string name1, int appartment, string phoneHome, string phoneMobile, bool isDogovorPresent,
                    bool isHaveBonus, int lsCode):this(0,dogovor,name,surName,name1,appartment,phoneHome,phoneMobile,isDogovorPresent,isHaveBonus,lsCode)
        {
        }

        public People(int id, Dogovor dogovor, string name, string surName, string name1, int appartment, string phoneHome, string phoneMobile, bool isDogovorPresent,
            bool isHaveBonus, int lsCode)
            : base(id)
        {
            _dogovor = dogovor;
            _name = name;
            _surName = surName;
            _name1 = name1;
            _appartment = appartment;
            _phoneHome = phoneHome;
            _phoneMobile = phoneMobile;
            _isDogovorPresent = isDogovorPresent;
            _isHaveBonus = isHaveBonus;
            _lsCode = lsCode;
        }
    }
}